<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>
relish programming language
</title>

<meta name="keywords" content="relish programming language web application development framework persistence" />
 <meta name="description" content="Home page for relish(TM), an application programming language which includes a simple full-stack web application framework and transparent persistence. Focus is on simplicity and minimalism via very strict enforcement of conventions. The name comes from the language's inbuilt construct of relations between datatypes. A programmer can express an entity-relation model of the application domain directly in the language then associate instances. Methods are owned by tuples of datatypes, and are dispatched by multi-argument multimethod dispatch.
relish is implemented in Go, and inherits/wraps some Go features like goroutine concurrency and channels, but is almost entirely unlike Go in language constructs and philosophy." />
 

 <link rel="stylesheet" type="text/css" id="stylesheet"
       href="/styles/default.css" />
</head>
<body>	
  <div id="header">	
  <table>
	<tr>
	  <td>	
        <a href="/"><img src="/relish_logo4_small.png"></a>
      </td>
	  <td>	
         &nbsp; &nbsp;
      </td>
	  <td>	
        <h1><a href="/">relish<span class="trademark">&#8482;</span></a></h1>
      </td>
	  <td style="width: 4em">	
         &nbsp; &nbsp;
      </td>  
	  <td>	
        <h2>Main Method Statements</h2>	
      </td>
    </tr>
  </table>
	 
  </div>
  <!-- <div id="download_button" class="menubutton" onclick="location='/download/'">
	DOWNLOAD
  </div> -->

<div id="content">
<p>
The main method (of whichever package relish was told to run) is where program execution starts. 
</p>
<p>
Normally, you would declare your main method in a source code file (a .rel file) of the package, like this:
</p>
<code><pre>
main
   a = 1
   b = plus a 4
   print b	
</pre></code>
<p>
<span style="background-color: yellow"><em>In the simple program trial environment, you should just type the list of statements you want executed. Don't indent them and don't include the 'main' declaration.</em></span><em>The environment will wrap your list of statements into a main method declaration automatically then run that main method.</em>
</p>
<p>
Caution: Do not write any infinite loops in your simple trial program main program statements or methods, or the (Run) command will not terminate.
</p>
<h3>Reference</h3>
<p>
<a href="http://relish.pl/references/relish_syntax_and_semantics_by_example.html#AssignmentStatements">Assignment statements  syntax and semantics by example</a>
</p>
<p>
<a href="http://relish.pl/references/relish_syntax_and_semantics_by_example.html#ControlStatements">Control statements syntax and semantics by example</a>
</p>
<p>
<a href="http://relish.pl/references/relish_syntax_and_semantics_by_example.html#MethodCalls">Method calls syntax and semantics by example</a>
</p>
<p>
<a href="http://relish.pl/references/relish_syntax_and_semantics_by_example.html#BuiltinMethods">relish built-in methods</a> These methods are always available to be called, without declaring them.
</p>
<p>
<a href="http://relish.pl/references/relish_syntax_and_semantics_by_example.html#InbuiltDataTypes">relish built-in datatypes</a>
</p>
</div>
</body>
</html>